<?php include($_SERVER['DOCUMENT_ROOT'] . "/includes/head.php"); ?>
<!--    <meta http-equiv="Content-Language" content="zh-CN">-->
    <meta name="keywords" content="在线工具">
    <script type="text/javascript">
        function iniFun($) {

        }
    </script>

    <script type="text/javascript" src="http://cdn.bootcss.com/showdown/1.2.3/showdown.min.js"></script>
    <script type="text/javascript">
        function compile() {
            var text = document.getElementById("content").value;
            var converter = new showdown.Converter();
            var html = converter.makeHtml(text);
            document.getElementById("result").innerHTML = html;
        }
    </script>

    <style>
        .wrapper {
            font-size: 16px;
            margin-bottom: 10px;
        }

        #content {
            height: 400px;
            width: 100%;
            background-color: #f8f8f8;
            padding: 20px 20px;
            resize: none;
            overflow: auto;
        }

        #result {
            margin-top: 20px;
            padding: 10px 20px;
            background-color: #f8f8f8;
        }

        ul li {
            line-height: 24px;
        }

        blockquote {
            border-left: #eee solid 5px;
            padding-left: 20px;
        }

        code {
            color: #D34B62;
            background: #F9F2F4;
        }
    </style>
<body>

<div id="mainDiv">
    <?php include($_SERVER['DOCUMENT_ROOT'] . "/includes/bar.php"); ?>
    <div class="header">
        <a href="/hush-Inn" title="返回主页" class="header-logo">MarkDown</a>
        <a href="#" class="header-navigation show-navigation"><i class="fa fa-navicon"></i></a>
    </div>
    <div class="header-clear-big"></div>


    <div id="mainContent" class="wrapper">
        <textarea id="content" onkeyup="compile()" placeholder="请在此输入MarkDown代码，若要避免样式冲突，请点击右下角 蓝色按钮 进入无样式页面"></textarea>

        <div id="result">将在此显示转换效果</div>
    </div>

    <!-- Page Footer-->
    <div class="footer">
        <div class="footer-socials three-bottom">
            <a href="#" class="footer-share show-share-bottom"><i class="fa fa-share-alt"></i></a>
            <a href="#" class="footer-up"><i class="fa fa-angle-up"></i></a>
            <a href="/hush-Inn/tools/markdown.php" class="footer-QQ" title="进入无样式页面（避免样式冲突）"><i class="fa fa-chain"></i></a>
        </div>
    </div>
    <?php include($_SERVER['DOCUMENT_ROOT'] . "/includes/share.php"); ?>
</div>
</body>
</html>